(print "this is demo print")
(+ 2 3 )
(message "hello emacs lisp")
(concat "hello" "emacs")
(concat "hello" "" " emacs")

(substring "hello emacs" 5)
(buffer-name)

(message "The current bufer name is : %s " (buffer-name))
(message "I will out put an numer , the numer is : %d" 20)
(message "The current buffer name is (%s),and fill-column is %d " (buffer-name) fill-column)
(fill-column)
(- fill-column 14)

;;赋值
(set 'flowers '(rose violte daisy buttercup))
flowers

(set 'count 1)
count

(setq counter 1)
(setq counter (+ counter 1))
counter

(buffer-file-name)
(current-time)
(current-buffer)
(other-buffer)
(switch-to-buffer (other-buffer))
(buffer-size)
(point)

(defun multiply-by-eight (number)
  "Multiply number with 8"
  (* number 8))
(multiply-by-eight 10)

(defun multiply-by-eight (number)
  "Multiply number with 8 interactive"
  (interactive "p")
  (message "The result is %d." (* 8 number)))

(let ((zebra 'stripes)
      (tiger 'fierce))
  (message "One kind of animal has %s and other is %s"
	   zebra tiger))

(if (> 5 4 )
    (message "5 is greater than 4")
  (message "this is nil"))

(if 4 
    'true
  'false)
(if nil
    'true
  'false)

;buffer related

(defun simplified-beginning-buffer ()
  "Move point to the beginning of the buffer"
  (interactive)
  (push-mark)
  (goto-char (point-min)))
(let (start end)
  (if (> 5 2)
      (setq start 5 end 2))
  (message "The start is %d and end is %d " start end))

(car '(hello word what the fuck))
(cdr '(hello word what the fuck))
(cons 'pine '(fire work))
(length '(hello world))
(progn (+ 2 3) (+ 3 4))
(directory-files "..")

(loop for (a b) in '((1 2) (3 4) (5 6))
      do (message "a: %d , b:%d" a b))
(loop for dir in (directory-files "d:/tony/emacs-home")
      do (message "file name : %s" dir))
(message "my emacs list path is (%s)" my-emacs-lisps-path)
(loop for dir in (directory-files my-emacs-lisps-path)
      do (message "file name : %s" dir))
(directory-files "d:")
(defvar path "d:/tony/emacs-home/tony-emacs-config")

(message "path is %s" path)

(defun is-dir (path-of-file)
  "validate the specified path of file is a directory or not,
   if this path is a directory,then return the path"
  (and
   (file-exists-p path-of-file)
   (file-directory-p path-of-file)
   (directory-file-name path-of-file)
   ))
(defun walk-dir (path-of-dir)
  "list all directories in current dir"
  (when (is-dir path-of-dir)
    (message path-of-dir)
    (loop for sub-file in (directory-files path-of-dir)
	  do (when (and (is-dir (concat path-of-dir "/" sub-file)) 
			(and 
			 (not (string-match "^\\..*$" sub-file))
			 ))
	       (walk-dir (concat path-of-dir "/" sub-file))))))

(walk-dir path)
(walk-dir "d:/tony/emacs-home/demo.el")
(string-match "^\\..*" ".emacs.d")
(if (string-match "^\\..*" ".emacs.d")
    (message "string is match")
  (message "string is not match "))